//
//  LPActivityDetailTableHeaderView.m
//  LovingPartyBuilding
//
//  Created by 刘应平 on 2017/6/6.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "LPActivityDetailTableHeaderView.h"

@implementation LPActivityDetailTableHeaderView

/**  50  */
- (instancetype)initWithFrame:(CGRect)frame buttonTitle:(NSString *)title buttonImgae:(NSString *)buttonImage
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor themeGrayColor];
        UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 60 * [UIScreen zj_screenWScale], 30 * [UIScreen zj_screenHScale])];
        button.titleLabel.font = [UIFont systemFontOfSize:[UIScreen zj_textFontScale] * 15];
        button.center = self.center;
        [button setTitle:title forState:UIControlStateNormal];
        [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [button setImage:[UIImage imageNamed:buttonImage] forState:UIControlStateNormal];
        [self addSubview:button];
        
        UIView *left = [UIView new];
        left.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:left];
        left.sd_layout.rightSpaceToView(button, 10 * [UIScreen zj_screenWScale])
        .centerYEqualToView(self)
        .heightIs(2)
        .widthIs(80 * [UIScreen zj_screenWScale]);
        
        
        UIView *right = [UIView new];
        right.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:right];
        right.sd_layout.leftSpaceToView(button, 10 * [UIScreen zj_screenWScale])
        .centerYEqualToView(self)
        .heightIs(1.5)
        .widthIs(80 * [UIScreen zj_screenWScale]);
        
    }
    return self;
}


@end
